package mx.com.matersys.vacs.domain;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooEntity(versionField = "", table = "mensajes")
public class Mensajes {
	
	@Id
	@TableGenerator(name = "GEN_MSJ", table = "sequence", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "SEQ_MSJ", allocationSize = 1)
	@GeneratedValue(strategy=GenerationType.TABLE, generator="GEN_MSJ")
    @Column(name = "idmensaje")
    private Integer idmensaje;
	
	@ManyToOne(optional = false)
	@JoinColumn(name = "idestatus", referencedColumnName = "idestatus")
    private Estatus idestatus;
    
    @Column(name = "isespecialistatransm")
    private Boolean isespecialistatransm;
    
    @Column(name = "isimportante")
    private Boolean isimportante;
    
    @Column(name = "isleido")
    private Boolean isleido;
    
    @Column(name = "mensaje", length = 500)
    private String mensaje;
    
    @Column(name = "receptor")
    private Integer receptor;
    
    @Column(name = "titulomensaje", length = 50)
    private String titulomensaje;
    
    @Column(name = "transmisor")
    private Integer transmisor;
    
    
    @Column(name = "fechaEnvio")
    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(style = "M-")
    private Date fechaEnvio;



    
}
